﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MediaGarden.Formats;
using MediaGarden.Playlists.Services;

namespace MediaGarden.Playlists.Formats
{
    /// <summary>
    /// Abstract format to implement for XML playlists
    /// </summary>
    public abstract class XmlPlaylistFormat : MimeMediaFormat, IPlaylistFormat
    {

        public string WriterName
        {
            get { return "Xml"; }
        }
        public override string MediaStereotype
        {
            get { return "Playlist"; }
        }

        public override IEnumerable<string> FileExtensions()
        {
            return new[]{"xml","html"};
        }

        public override IEnumerable<string> MimeTypes()
        {
            // TODO: We could have some general parsing for XML playlists of form [type]/[impl]+xml
            return new[]{
                "text/xml",
                "application/xml",
                "text/html"
            };
        }

    }
}